Network game, also called “online game”, is a sustainable multiplayer online game that uses the Internet as transmission medium, game servers and user devices (such as computers, smartphones, tablet computers) as processing terminals, and game client terminals or webpages as information exchange windows. Network game is generally intended to realize various purposes such as entertainment, recreation, communication and accomplishing virtual achievements, etc.
Existing network game systems include two main types of interaction modes between roles, i.e., an interactive competition mode among users, and an interactive competition mode between a user and environment.
The interactive competition mode among users (PVP, or Player VS Player) means competition between users. A network game system may need to include a processing system related to PVP, in order to process interaction instructions and data under the PVP mode.
The interactive competition mode between user and environment (PVE, or Player VS Environment) means interactive competition formed between a user and a non-player-controlled character (NPC). The NPC is controlled by an NPC system in the network game system. The NPC system includes artificial intelligence (AI) module(s). The AI module(s) refer to the control logic of the NPC in games, and can make the NPC in games possess independent artificial intelligence capabilities. User roles and NPC roles can have gaming interactions, such as dialogue, obtaining services, combating, etc.
Existing network game systems, especially Kingdom Wars type of network game systems, i.e., massive multiplayer online real-time strategy (MMORTS) game systems, may be based on PVP mode. However, rich PVE mode also needs to be provided in network games in order to meet the demand of role growth. Good user experience is also required in the running and processing of the PVE mode.
Based on methods for obstructing between roles, existing network game systems can be divided into network game systems with dynamic obstructions and network game systems without dynamic obstructions.
In the network game systems with dynamic obstructions, a role model can be obstructed not only by fixed landscapes (e.g., mountains, stones, houses, etc.), but also by other role models. The role model is a simulated 2D (2-dimensional) or 3D (3-dimensional) image of a role. For example, the role model is usually a 2D image in a 2D network game, and is usually a 3D image in a 3D network game.
In the network game systems without dynamic obstructions, a role model can be obstructed by fixed landscapes, but does not have to be obstructed by other dynamic role models.
In MMORTS network games, there can be a large number of roles participating in the game. In order to ensure the clarity of role models' locations in the picture and ensure that good picture operation experience is provided for users, the role models controlled by the network game system need to avoid visually overlapping with each other during short-range interactions. For example, the short-range interactions can be attacking interactions in which an NPC role attacks a user role, or other dialogue interactions, etc.
In a network game system with dynamic obstructions, the game system has a special obstruction algorithm for real-time calculation of dynamic obstruction information between role models. Therefore, the probability of role models visually overlapping with each other is low. Thus, operation experience is good. However, because real-time calculation of dynamic obstruction information is needed, the server system overhead can be too high, wherein the overhead includes central processing unit (CPU) overhead and storage resource overhead.
In a network game system without dynamic obstructions, because dynamic obstruction information does not need to be real-time calculated, the cost of system can be lower in comparison with a network game system with dynamic obstructions. Therefore, existing large-scale MMORTS network games, which are based mainly on PVP modes with PVE modes as supplement, are usually without dynamic obstructions.
In existing network game systems without dynamic obstructions, in order to solve the issue of reducing role models' overlapping during the short-range interactions between user role and NPC role, and to provide users with good visual experience, an AI module of the NPC system needs to detect and calculate in real time relative coordinate positions between roles and to dynamically adjust the coordinates of the NPC role. A method for such real-time detection and calculation can include specific steps as follows.
For example, an NPC role has current coordinates of (x1, y1) and a radius of r1, and a user role has current coordinates of (x2, y2) and a radius of r2. A radius for a short-range interaction to occur between the NPC role and the user role (such as the NPC role attacking the user role) is ar. When the NPC role has an attacking target (i.e., a target role), a distance s between the coordinate points of the NPC role and the user role is calculated at each time when a driving clock cycle of the NPC role arrives.
If s>r1+r2+ar, the NPC role continues to move toward the target role, and sends a “move” message packet to all roles in a field of view.
If s>r1+r2+ar, the NPC role immediately stops moving, and sends a “stop moving” message packet to all roles in the field of view.
Another NPC role that attacks the same user role can dynamically calculate and adjust the position of itself according to the message packets from other NPC roles regarding whether to move or not, so as to avoid overlapping with other NPC role models.
Therefore, in existing network game systems without dynamic obstructions, in order to reduce the probability of role models' overlapping during short-range interactions between user role and NPC role, each NPC role is required to perform real-time and complex dynamic calculation at each time when a driving clock cycle arrives. That is, each NPC role needs to not only calculate the distance s between itself and the attacking target (i.e., the target role), but also determine whether to send a relevant message packet according to the length of s, and also receive message packets from other NPC roles to re-calculate its own coordinate position based on the moving situations of the other NPC roles. Thus, the amount of calculations can be tremendous, and can take a large amount of system overhead, such as CPU overhead, storage overhead, bandwidth overhead, etc. Especially in large network game systems, the number of NPC roles in a server can be usually more than the order of tens of thousands. As a result, the overhead of the NPC system that drives the NPC roles can be very large.